import type {Route}          from '../index.type'
import Layout                from '@/layout/index.vue'
import {createNameComponent} from '../createNode'

const route: Route[] = [
    {
        path     : '/garden',
        component: Layout,
        meta     : {
            title: '主题公园运营状态监测',
            icon : 'sfont system-page'
        },
        children : [
            {
                name     : 'list',
                path     : 'list',
                component: createNameComponent(() => import('@/views/main/garden/list/index.vue')),
                meta     : {
                    title: '数据融合',
                    cache: true,
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path     : '/map',
        component: Layout,
        meta     : {
            title: '主题公园运营状态监测',
            icon : 'sfont system-page'
        },
        children : [
            {
                name     : 'map',
                path     : 'map',
                component: createNameComponent(() => import('@/views/main/map/map/index.vue')),
                meta     : {
                    title: '地图展示',
                    cache: true,
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path     : '/garden',
        component: Layout,
        meta     : {
            title: '主题公园运营状态监测',
            icon : 'sfont system-page'
        },
        children : [
            {
                name     : 'manage',
                path     : 'manage',
                component: createNameComponent(() => import('@/views/main/garden/manage/index.vue')),
                meta     : {
                    title: '采集管理',
                    cache: true,
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path     : '/garden',
        component: Layout,
        meta     : {
            title: '主题公园运营状态监测',
            icon : 'sfont system-page'
        },
        children : [
            {
                name     : 'log',
                path     : 'log',
                component: createNameComponent(() => import('@/views/main/garden/log/index.vue')),
                meta     : {
                    title: '日志查询',
                    cache: true,
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path     : '/garden',
        component: Layout,
        meta     : {
            title: '主题公园运营状态监测',
            icon : 'sfont system-page'
        },
        hideMenu : true,
        children : [
            {
                name     : 'comment',
                path     : 'comment',
                component: createNameComponent(() => import('@/views/main/garden/comment/index.vue')),
                hideMenu : true,
                meta     : {
                    title: '公园评论',
                    cache: true,
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path     : '/garden',
        component: Layout,
        meta     : {
            title: '主题公园运营状态监测',
            icon : 'sfont system-page'
        },
        hideMenu : true,
        children : [
            {
                name     : 'statistics',
                path     : 'statistics',
                component: createNameComponent(() => import('@/views/main/garden/statistics/index.vue')),
                hideMenu : true,
                meta     : {
                    title: '公园统计',
                    cache: true,
                    roles: ['admin']
                }
            },
        ]
    }
]

export default route
